<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增员工档案')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-profile-add" >
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">登录名称：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="userId" th:value="${staffProfile.getUserId()}">
                    <input type="text" disabled class="form-control"  th:value="${user.getLoginName()}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">姓　　名：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">性　　别：</label>
                <div class="col-sm-8">
                    <select name="gender" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">身份证：</label>
                <div class="col-sm-8">
                    <input name="idNumber" id="idNumber" class="form-control" required type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">手机号码：</label>
                <div class="col-sm-8">
                    <input name="mobile" id="mobile" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工资卡银行：</label>
                <div class="col-sm-8">
                    <input name="bankName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工资卡支行：</label>
                <div class="col-sm-8">
                    <input name="bankBranch" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工资卡号：</label>
                <div class="col-sm-8">
                    <input name="bankNumber" id="bankNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">民　　族：</label>
                <div class="col-sm-8">
                    <input name="nation" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">籍　　贯：</label>
                <div class="col-sm-8">
                    <input name="nativePlace" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">生　　日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="birthday" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否已婚：</label>
                <div class="col-sm-8">
                    <select name="married" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">居住地址：</label>
                <div class="col-sm-8">
                    <input name="livingPlace" class="form-control"></input>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">微信/qq：</label>
                <div class="col-sm-8">
                    <input name="contact" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">籍贯地址：</label>
                <div class="col-sm-8">
                    <input name="birthPlace" class="form-control"></input>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">城镇户口：</label>
                <div class="col-sm-8">
                    <select name="urban" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上次社保城市：</label>
                <div class="col-sm-8">
                    <input name="lastInsuranceCity" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">公积金账号：</label>
                <div class="col-sm-8">
                    <input name="accumulationFundAccount" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">学　　历：</label>
                <div class="col-sm-8">
                    <select name="educationLevel"  class="form-control m-b"  th:with="type=${@dict.getType('education_level')}">
                        <option value="">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">毕业学校：</label>
                <div class="col-sm-8">
                    <input name="highSchool" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">证书编号：</label>
                <div class="col-sm-8">
                    <input name="graduationNumber" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">入职时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="onboardDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">离职时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="departDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">紧急联系方式：</label>
                <div class="col-sm-8">
                    <input name="emergeContact" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "erp/profile"
        $("#form-profile-add").validate({
            focusCleanup: true,
            rules:{
                idNumber: {
                    isIdentity:true
                },
                mobile: {
                    isPhone: true
                }
            }
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-profile-add').serialize());
            }
        }

        $("input[name='birthday']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='onboardDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='departDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>